using System.Collections.Generic;
using SharpObjects.SearchEngine.Common.Search;

namespace SharpObjects.SearchEngine.Common.StatisticalAnalysis
{
    public interface ISimilarity
    {
        /// <summary>
        /// Calculates the distance between two vectors: range 0 - 1
        /// </summary>
        /// <param name="vector1">Term vector 1</param>
        /// <param name="vector2">Term vector 2</param>
        /// <returns>Cosine distance between vectors in the range of 0 to 1</returns>
        double CalculateDistance(List<TermVectorItem> vector1, List<TermVectorItem> vector2);

        /// <summary>
        /// Calculates cosine distance between two vectors, represented by characterizers (dictionary of terms and their TF-IDFs): range 0 - 1
        /// </summary>
        /// <param name="characterizer1">Characterizer 1 - Dictionary[term, TF-IDF]</param>
        /// <param name="characterizer2">Characterizer 2 - Dictionary[term, TF-IDF]</param>
        /// <returns>Cosine distance between characterizers in the range of 0 to 1</returns>
        double CalculateDistance(Dictionary<string, double> characterizer1, Dictionary<string, double> characterizer2);


    }
}